{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "56c31ec0",
   "metadata": {},
   "source": [
    "# Lab: Simulate Dice Throws with Numpy 🎲🤖\n",
    "\n",
    "Welcome! In this lab you will see how you can use numpy to simulate different scenarios involving rolling dices from rolling a single die up to doing multiple rolls and summing the result. You will also see how to handle situations in which one of the sides of the die is loaded (it has a greater probability of landing on that side comparing to the rest).\n",
    "\n",
    "Let's get started! "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "af4835c6",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0968af94",
   "metadata": {},
   "source": [
    "## Represent a die\n",
    "\n",
    "The first thing you will need is to define how many sides your dice will have. You can even go a step further and represent a die by using a numpy array and assigning to each side a label which will be equal to the number of that side:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "70b01f08",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3, 4, 5, 6])"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Define the desired number of sides (try changing this value!)\n",
    "n_sides = 6\n",
    "\n",
    "# Represent a die by using a numpy array\n",
    "die = np.array([i for i in range(1, n_sides+1)])\n",
    "\n",
    "die"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6be050b4",
   "metadata": {},
   "source": [
    "## Roll the die\n",
    "\n",
    "With your die ready it is time to roll it. For now you will assume that the die is fair, which means the probability of landing on each side is the same (it follows a uniform distribution). To achieve this behaviour you can use the function [np.random.choice](https://numpy.org/doc/stable/reference/random/generated/numpy.random.choice.html), which given a numpy array returns one of the entries in it randomnly:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "154f10d6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Run this cell multiple times (every time you should get a different result at random)\n",
    "np.random.choice(die)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "12750521",
   "metadata": {},
   "source": [
    "This is great but if you wanted to roll the die 20 times you will need to run the cell 20 times and record each result. Now you need a way to simulate several rolls at the same time. For this you can define the number of rolls you desire and use a list comprehension to roll the die as many times as you like, you can also save every roll in a numpy array:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "a6f516d3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([4, 3, 2, 6, 3, 2, 5, 2, 4, 1, 5, 2, 5, 6, 1, 6, 2, 4, 1, 3])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Roll the die 20 times\n",
    "n_rolls = 20\n",
    "\n",
    "# Save the result of each roll\n",
    "rolls = np.array([np.random.choice(die) for _ in range(n_rolls)])\n",
    "\n",
    "rolls"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "acc775fb",
   "metadata": {},
   "source": [
    "Now you have a convenient way of keeping track of the result of each roll, nice!\n",
    "\n",
    "What is you would like to know the mean and variance of this process. For this you can use numpy's functions [np.mean](https://numpy.org/doc/stable/reference/generated/numpy.mean.html) and [np.var](https://numpy.org/doc/stable/reference/generated/numpy.var.html):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "bb5fbb69",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "mean of rolls: 3.35\n",
      "variance of rolls: 2.83\n"
     ]
    }
   ],
   "source": [
    "# Compute mean of 20 rolls\n",
    "m = np.mean(rolls)\n",
    "\n",
    "# Compute variance of 20 rolls\n",
    "v = np.var(rolls)\n",
    "\n",
    "print(f\"mean of rolls: {m:.2f}\\nvariance of rolls: {v:.2f}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0f8a9054",
   "metadata": {},
   "source": [
    "You can even check the distribution of the rolls by plotting a histogram of the numpy array that holds the result of each throw. For this you will use the plotting library Seaborn, concretely the [sns.histplot](https://seaborn.pydata.org/generated/seaborn.histplot.html) function:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "52fe0fd6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAGdCAYAAAA8F1jjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAZcElEQVR4nO3dfZDVdd3/8feRhYPh7iogCrHceMetqAFD4M2lohQZo+NU2qXGWDbZIKI7ToZWiKOu/aFpoVswhTmN4TSG0oyieANYRsESgYSGI15sCBLe7AHCY8L5/dGwv1ZQYV32++HweMycmc7Ncl59h4Zn33OzuVKpVAoAgAQdlvUAAIAPI1QAgGQJFQAgWUIFAEiWUAEAkiVUAIBkCRUAIFlCBQBIVkXWAz6JXbt2xeuvvx6VlZWRy+WyngMA7INSqRRbt26NXr16xWGHffQ5k4M6VF5//fWoqanJegYA0AqNjY3Ru3fvj3zMQR0qlZWVEfGf/6JVVVUZrwEA9kWhUIiamprmf8c/ykEdKrtf7qmqqhIqAHCQ2Ze3bXgzLQCQLKECACRLqAAAyRIqAECyhAoAkCyhAgAkS6gAAMkSKgBAsoQKAJAsoQIAJCvTULnlllsil8u1uBx77LFZTgIAEpL57/oZMmRIPP30083XO3TokOEaACAlmYdKRUWFsygAwF5lHipr166NXr16RT6fj1GjRsUdd9wRxx133F4fWywWo1gsNl8vFArtNZOPsX79+tiyZUvWMw4K3bt3jz59+mQ9A+CgkGmojBo1Kh588ME46aST4o033ojbbrstxowZE6tXr45u3brt8fi6urqYPn16Bkv5KOvXr4+BAwfFjh3/ynrKQeHwwz8VL720RqwA7INcqVQqZT1it+3bt8fxxx8f3/nOd6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sp6Vtn7n//5n9KUKVOynlF2LrnkklLPnj1LHTt2LPXq1at08cUXl1avXp31rLL0u9/9rjR06NBSPp8vDRw4sDRz5szMtuRKpVIpm0QCAPho3kwLACRLqAAAyRIqAECyhAoAkCyhAgAkS6gAAMkSKgBAsoQKAJAsoQIAJEuoAADJEioAQLKECgCQrP8HrA23pC7Sak8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Display histogram of 20 rolls\n",
    "sns.histplot(rolls)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2d210eb7",
   "metadata": {},
   "source": [
    "You probably didn't get a distribution that looks uniform (since the results are random). This happened because you are only simulating 20 rolls so far. Now try doing the same but for 20000 rolls:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "01b974f5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "mean of rolls: 3.49\n",
      "variance of rolls: 2.93\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkQAAAGdCAYAAADzOWwgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAsU0lEQVR4nO3de3BUdZ738U9LLlxMjiQx6WSJmBkxAgmORayQ6CjXQHZDVKxFl50s7jCgIwQzQLkL7I5ZS4nrloCbjFmgGG6BiX+MKJbaEERwWAiXzGQFhmGxxMegaYJM0iE8mQ6G8/wxxXmmCaDGkO707/2q+lXlnPPt099zDJWPv3NOt8u2bVsAAAAGuynYDQAAAAQbgQgAABiPQAQAAIxHIAIAAMYjEAEAAOMRiAAAgPEIRAAAwHgEIgAAYLyIYDfQV1y6dElffPGFYmJi5HK5gt0OAAD4Bmzb1vnz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vEf/1F33XWX/umf/kn9+vULUmfhz+/36/jx4/rhD38Y7FbCyn333dflo1D+93//NyhfvE4gCpK2tjZ9/PHHzvKpU6dUX1+vuLg43XbbbUHsLLzMnTtXW7Zs0VtvvaWYmBh5vV5JkmVZGjBgQJC7Cx9LlixRfn6+UlNTdf78eVVXV2v37t1dnvLDdxMTE9Pl/rdBgwYpPj6e++J62KJFizR16lTddtttampq0gsvvKDW1lbNnDkz2K2FlZ/97GfKzc3VsmXLNH36dB08eFCrV6/W6tWre78ZG0HxwQcf2JK6jJkzZwa7tbBytXMsyV63bl2wWwsrP/7xj+2hQ4faUVFR9q233mpPmDDB3rFjR7DbMsKDDz5oP/PMM8FuI+w89thjdnJysh0ZGWmnpKTY06ZNs48dOxbstsLS22+/bWdkZNjR0dH2XXfdZa9evToofbhs27Z7P4YBAACEDm6qBgAAxiMQAQAA4xGIAACA8QhEAADAeAQiAABgPAIRAAAwHoEIAAAYj0AEAACMRyACAADGIxABAADjEYgAAIDxCEQAAMB4/w9Bc3Cg093BrwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "n_rolls = 20_000\n",
    "\n",
    "rolls = np.array([np.random.choice(die) for _ in range(n_rolls)])\n",
    "\n",
    "print(f\"mean of rolls: {np.mean(rolls):.2f}\\nvariance of rolls: {np.var(rolls):.2f}\")\n",
    "\n",
    "sns.histplot(rolls)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "00c6a396",
   "metadata": {},
   "source": [
    "Does this plot and the metrics of mean and variance allign with what you have learned about the uniform distribution during the course?\n",
    "\n",
    "Simulations are a great way of contrasting results against analytical solutions. For example, in this case the theoretical mean and variance are 3.5 and 2.916 respectively (you can check the formulas to get this results [here](https://en.wikipedia.org/wiki/Discrete_uniform_distribution)). The important thing to keep in mind is that the more simulations you perform the closer your results will be to the analytical values so always choose an appropriate number of simulations! \n",
    "\n",
    "Numpy is quite fast so performing 20 thousand runs is done fairly quick."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "654b7935",
   "metadata": {},
   "source": [
    "## Summing the result of rolling twice\n",
    "\n",
    "Now you want to throw the die twice and record the sum of the two rolls. For this you can do as before and save all results of the first roll in a numpy array but this time you will have a second array that saves the results for the second rolls. \n",
    "\n",
    "To get the sum you can simply sum the two arrays. This is possible because numpy allows for vectorized operations such as this one. When you sum two numpy arrays you will get a new array that includes the element-wise sum of the elements in the arrays you summed up.\n",
    "\n",
    "Notice that now you can compute the the mean and variance for the first rolls, the second rolls and the sum of rolls. You can also compute the covariance between the first and second rolls:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "5dcce70f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "mean of first_rolls: 3.48\n",
      "variance of first_rolls: 2.93\n",
      "\n",
      "mean of second_rolls: 3.51\n",
      "variance of second_rolls: 2.92\n",
      "\n",
      "mean of sum_of_rolls: 7.00\n",
      "variance of sum_of_rolls: 5.82\n",
      "\n",
      "covariance between first and second roll:\n",
      "[[ 2.9322938  -0.01529689]\n",
      " [-0.01529689  2.9153192 ]]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkAAAAGdCAYAAAD60sxaAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAyW0lEQVR4nO3df1TVdZ7H8deVn5VKKoiggNgxxchyLzstKFmr4mhHc6YmzdSapF3CSYGpUULXiY6wmhmZgqPJeNw03Umb2mJKasosaEyEasrV2lAIL4sogegJFO7+4enu3LlXgyvwBb7Pxznfc7if+/l87vtz03j5ud/v91rsdrtdAAAAJtLH6AIAAAC6GgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDg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4EFt3rxZmzdvNrq0XmXGjBlatWqVwsPDddNNN6m0tFTr1q3Tww8/bHRpPVpjY6O+/vprx+Py8nKVlZVp4MCBCg8PV0pKirKysjRy5EiNHDlSWVlZuvbaazV37lwDq+55rvQ+h4aG6t5779Xhw4f1xhtvqKWlxfG7ceDAgfL19e38ArvkWjOTk+T2+P3vf290ab0el8F3nv/6r/+yR0dH2/38/OyjR4+2b9682eiSep2Ghgb7kiVL7OHh4XZ/f3/7iBEj7BkZGfampiajS+vR3nvvPbf/T37wwQftdvulS+FXrlxpHzJkiN3Pz89+++232z///HNji+6BrvQ+l5eXX/Z343vvvdcl9Vnsdru982MWAABA98E5QAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHT+D7oA8eKVXk4fAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "n_rolls = 20_000\n",
    "\n",
    "# First roll (same as before)\n",
    "first_rolls = np.array([np.random.choice(die) for _ in range(n_rolls)])\n",
    "\n",
    "# Second roll (code is the same but saved in a new numpy array)\n",
    "second_rolls = np.array([np.random.choice(die) for _ in range(n_rolls)])\n",
    "\n",
    "# Sum both rolls (this is easy since numpy allows vectorization)\n",
    "sum_of_rolls = first_rolls + second_rolls\n",
    "\n",
    "# Print mean, variance and covariance\n",
    "print(f\"mean of first_rolls: {np.mean(first_rolls):.2f}\\nvariance of first_rolls: {np.var(first_rolls):.2f}\\n\")\n",
    "print(f\"mean of second_rolls: {np.mean(second_rolls):.2f}\\nvariance of second_rolls: {np.var(second_rolls):.2f}\\n\")\n",
    "print(f\"mean of sum_of_rolls: {np.mean(sum_of_rolls):.2f}\\nvariance of sum_of_rolls: {np.var(sum_of_rolls):.2f}\\n\")\n",
    "print(f\"covariance between first and second roll:\\n{np.cov(first_rolls, second_rolls)}\")\n",
    "\n",
    "# Plot histogram\n",
    "sns.histplot(sum_of_rolls, stat = \"probability\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1bf4dbd4",
   "metadata": {},
   "source": [
    "The resulting plot looks pretty Gaussian, as you might expect. Notice that the covariance between the first and second rolls is very close to zero since these two processes are independant of one another.\n",
    "\n",
    "Also notice that you can change the stat displayed in the histogram by changing the `stat` parameter of the `sns.histplot` function. In the previous exercises you were displaying the frequency but in this latter one you are plotting the probability, which makes more sense in this context. To check what other stats are available you can check the [docs](https://seaborn.pydata.org/generated/seaborn.histplot.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f70efe53",
   "metadata": {},
   "source": [
    "## Using loaded dice\n",
    "\n",
    "So far you have only simulated dice that are fair (all of the sides on them have the same probability of showing up), but what about simulating loaded dice (one or more of the sides have a greater probability of showing up)?\n",
    "\n",
    "It is actually pretty simple. [np.random.choice](https://numpy.org/doc/stable/reference/random/generated/numpy.random.choice.html) has support for these kind of scenarios by having a parameter `p` you can set. This parameter controls the probability of selecting each one of the entries in the array.\n",
    "\n",
    "To see it in action, code a function that returns the probabilities of the die landing on each side given that one of the sides must have twice as much probability as the rest of them:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "84478b71",
   "metadata": {},
   "outputs": [],
   "source": [
    "def load_dice(n_sides, loaded_number):\n",
    "    \n",
    "    # All probabilities are initially the same\n",
    "    probs = np.array([1/(n_sides+1) for _ in range(n_sides)])\n",
    "    \n",
    "    # Assign the loaded side a probability that is twice as the other ones\n",
    "    probs[loaded_number-1] = 1 - sum(probs[:-1])\n",
    "    \n",
    "    # Check that all probabilities sum up to 1\n",
    "    if not np.isclose(sum(probs), 1):\n",
    "        print(\"All probabilities should add up to 1\")\n",
    "        return\n",
    "    \n",
    "    return probs "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "45768e32",
   "metadata": {},
   "source": [
    "Before using this function, check how the probabilities of a fair die would look like:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "c63f659b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGiCAYAAAA1LsZRAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAa60lEQVR4nO3df2zddf3o8VdpaYuT1rCxuoVuVMUxVkBozezmIIg2qWZx0avz14YK0cYBjl5udM4ILmrVCzr86opFRScCixf8FafQP9wYLkZXu0gQFRVts7TOTW3HrnZfunP/4Np7a7e509bva2c+Hskn8bz7+ZzzOp9o9vRzTj8tKxQKhQAASHJG9gAAwL83MQIApBIjAEAqMQIApBIjAEAqMQIApBIjAEAqMQIApBIjAEAqMQIApJpSjGzZsiUaGhqiuro6mpqaYteuXcfdd8eOHVFWVjZp+8UvfjHloQGA00fRMbJt27ZYv359bNy4Mfr6+mLFihXR1tYW/f39Jzzul7/8ZQwODo5vF1xwwZSHBgBOH2XF/qG8pUuXxuWXXx5dXV3ja4sXL45Vq1ZFZ2fnpP137NgRV111Vfz5z3+O5z3vedMeGAA4vVQUs/ORI0eit7c33v/+909Yb21tjd27d5/w2Msuuyz+9re/xUUXXRQf/OAH46qrrjruvqOjozE6Ojr++OjRo/GnP/0pZs+eHWVlZcWMDAAkKRQKcejQoZg/f36cccbxP4wpKkYOHDgQY2NjUVdXN2G9rq4uhoaGjnnMvHnzoru7O5qammJ0dDS++tWvxtVXXx07duyIK6644pjHdHZ2xoc//OFiRgMATlEDAwNx3nnnHffnRcXI3/3j1YlCoXDcKxaLFi2KRYsWjT9uaWmJgYGBuO22244bIxs2bIiOjo7xx8PDw7FgwYIYGBiImpqaqYwMAPwXGxkZifr6+jj77LNPuF9RMTJnzpwoLy+fdBVk//79k66WnMjLXvayuOeee47786qqqqiqqpq0XlNTI0YAoMT8s69YF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KyNHjhyJ3t7eaG1tnbDe2toau3fvPqnnOHr0aBw6dCjOOeec4+7T2dkZtbW141t9fX0xYwIAJaSoGDlw4ECMjY1FXV3dhPW6uroYGho6qee4/fbb4/Dhw/HGN77xuPts2LAhhoeHx7eBgYFixgQASkjFVA4qKyub8LhQKExaO5b77rsvbr311vjWt74Vc+fOPe5+VVVVUVVVNZXRAIASU1SMzJkzJ8rLyyddBdm/f/+kqyX/aNu2bXHttdfG17/+9XjlK19Z/KQAwGmpqI9pKisro6mpKXp6eias9/T0xLJly4573H333Rdvf/vb4957743XvOY1U5sUADgtFf0xTUdHR6xZsyaam5ujpaUluru7o7+/P9rb2yPi2e977Nu3L7Zu3RoRz4bI2rVr44477oiXvexl41dVzjrrrKitrZ3BtwIAlKKiY2T16tVx8ODB2LRpUwwODkZjY2Ns3749Fi5cGBERg4ODE+458vnPfz6eeeaZWLduXaxbt258/Zprrokvf/nL038HAEBJK/o+IxlO9veUAYBTx7/kPiMAADNNjAAAqcQIAJBKjAAAqcQIAJBKjAAAqcQIAJBKjAAAqcQIAJBKjAAAqcQIAJBKjAAAqcQIAJBKjAAAqcQIAJBKjAAAqcQIAJCqInuAmdL0P7Zmj3BK6P2fa6f9HP2bLp6BSUrfgg89Nq3jl//H8hmapPT98IYfTuv4nVdcOUOTlLYrH9k57ef47H//zgxMUvquv33ltI7/6Nv+2wxNUvo23vO/pv0crowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKnECACQSowAAKmmFCNbtmyJhoaGqK6ujqampti1a9dx9x0cHIy3vOUtsWjRojjjjDNi/fr1U50VADgNFR0j27Zti/Xr18fGjRujr68vVqxYEW1tbdHf33/M/UdHR+Pcc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3b46HHnoourq6orOzc9L+d955ZyxYsCA2b94cERGLFy+OPXv2xG233Ravf/3rj/kao6OjMTo6Ov54eHg4IiJGRkaOO9fY6F+LfSunpROdo5N16G9jMzBJ6ZvuuXzmr8/M0CSlb7rn8vAzzmXEzPzv+6+j/3sGJil90z2Xf/vP/5yhSUrfic7l339WKBRO/CSFIoyOjhbKy8sLDz744IT1G2+8sXDFFVcc85gVK1YUbrzxxglrDz74YKGioqJw5MiRYx5zyy23FCLCZrPZbDbbabANDAycsC+KujJy4MCBGBsbi7q6ugnrdXV1MTQ0dMxjhoaGjrn/M888EwcOHIh58+ZNOmbDhg3R0dEx/vjo0aPxpz/9KWbPnh1lZWXFjPxfZmRkJOrr62NgYCBqamqyxylpzuXMcS5nhvM4c5zLmVMK57JQKMShQ4di/vz5J9yv6I9pImJSEBQKhRNGwrH2P9b631VVVUVVVdWEtec973lTmPS/Xk1NzSn7X4pS41zOHOdyZjiPM8e5nDmn+rmsra39p/sU9QXWOXPmRHl5+aSrIPv375909ePvnv/85x9z/4qKipg9e3YxLw8AnIaKipHKyspoamqKnp6eCes9PT2xbNmyYx7T0tIyaf+HH344mpub48wzzyxyXADgdFP0r/Z2dHTEF77whfjSl74UTzzxRNx0003R398f7e3tEfHs9z3Wrl07vn97e3v8/ve/j46OjnjiiSfiS1/6Unzxi1+Mm2++eebexSmgqqoqbrnllkkfL1E853LmOJczw3mcOc7lzDmdzmVZofDPft9msi1btsQnP/nJGBwcjMbGxvj0pz8dV1xxRUREvP3tb4/f/e53sWPHjvH9d+7cGTfddFM8/vjjMX/+/Hjf+943Hi8AwL+3KcUIAMBM8bdpAIBUYgQASCVGAIBUYgQASCVGpumRRx6JlStXxvz586OsrCy++c1vZo9Ukjo7O+OlL31pnH322TF37txYtWpV/PKXv8weqyR1dXXFJZdcMn5XxpaWlvje976XPVbJ6+zsjLKysli/fn32KCXn1ltvjbKysgnb85///OyxSta+ffvibW97W8yePTue85znxEte8pLo7e3NHmtaxMg0HT58OC699NL47Gc/mz1KSdu5c2esW7cufvSjH0VPT08888wz0draGocPH84ereScd9558fGPfzz27NkTe/bsiVe84hXx2te+Nh5//PHs0UrWT37yk+ju7o5LLrkke5SStWTJkhgcHBzfHnvsseyRStKf//znWL58eZx55pnxve99L37+85/H7bffXjJ/MuV4pvS3afh/2traoq2tLXuMkvf9739/wuO777475s6dG729veP3sOHkrFy5csLjj370o9HV1RU/+tGPYsmSJUlTla6nn3463vrWt8Zdd90VH/nIR7LHKVkVFRWuhsyAT3ziE1FfXx933333+Nr555+fN9AMcWWEU9Lw8HBERJxzzjnJk5S2sbGxuP/+++Pw4cPR0tKSPU5JWrduXbzmNa+JV77yldmjlLQnn3wy5s+fHw0NDfGmN70pfvvb32aPVJK+/e1vR3Nzc7zhDW+IuXPnxmWXXRZ33XVX9ljTJkY45RQKhejo6IiXv/zl0djYmD1OSXrsscfiuc99blRVVUV7e3t84xvfiIsuuih7rJJz//33x09/+tPo7OzMHqWkLV26NLZu3RoPPfRQ3HXXXTE0NBTLli2LgwcPZo9Wcn77299GV1dXXHDBBfHQQw9Fe3t73HjjjbF169bs0abFxzSccq6//vr42c9+Fo8++mj2KCVr0aJFsXfv3vjLX/4SDzzwQFxzzTWxc+dOQVKEgYGBeO973xsPP/xwVFdXZ49T0v7/j7IvvvjiaGlpiRe+8IXxla98JTo6OhInKz1Hjx6N5ubm+NjHPhYREZdddlk8/vjj0dXVNeHvwpUaV0Y4pdxwww3x7W9/O37wgx/Eeeedlz1OyaqsrIwXvehF0dzcHJ2dnXHppZfGHXfckT1WSent7Y39+/dHU1NTVFRUREVFRezcuTM+85nPREVFRYyNjWWPWLJmzZoVF198cTz55JPZo5ScefPmTfo/FYsXL47+/v6kiWaGKyOcEgqFQtxwww3xjW98I3bs2BENDQ3ZI51WCoVCjI6OZo9RUq6++upJv/Hxjne8Iy688MJ43/veF+Xl5UmTlb7R0dF44oknYsWKFdmjlJzly5dPuu3Br371q1i4cGHSRDNDjEzT008/Hb/+9a/HHz/11FOxd+/eOOecc2LBggWJk5WWdevWxb333hvf+ta34uyzz46hoaGIiKitrY2zzjorebrS8oEPfCDa2tqivr4+Dh06FPfff3/s2LFj0m8scWJnn332pO8szZo1K2bPnu27TEW6+eabY+XKlbFgwYLYv39/fOQjH4mRkZG45pprskcrOTfddFMsW7YsPvaxj8Ub3/jG+PGPfxzd3d3R3d2dPdr0FJiWH/zgB4WImLRdc8012aOVlGOdw4go3H333dmjlZx3vvOdhYULFxYqKysL5557buHqq68uPPzww9ljnRauvPLKwnvf+97sMUrO6tWrC/PmzSuceeaZhfnz5xde97rXFR5//PHssUrWd77znUJjY2OhqqqqcOGFFxa6u7uzR5q2skKhUEjqIAAAX2AFAHKJEQAglRgBAFKJEQAglRgBAFKJEQAglRgBAFKJEQAglRgBAFKJEQAglRgBAFL9H0NATmo5n8VlAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Compute same probabilities for every side\n",
    "probs_fair_die = np.array([1/n_sides]*n_sides)\n",
    "\n",
    "# Plot probabilities\n",
    "fair_die_sides = sns.barplot(x=die, y=probs_fair_die)\n",
    "fair_die_sides.set_ylim(0,0.5)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8bbf1913",
   "metadata": {},
   "source": [
    "Now get the probabilities by using the `load_dice` function. Try changing the loaded side!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "67536017",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGiCAYAAAA1LsZRAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAbDElEQVR4nO3dcXCddZno8SckJGG7JA4tje2QlqxiKQ0gJE5Nu4VB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pss8+O7373u/HjH/847r777pL5kyknM6W/TcP/09bWFm1tbdljlLx//Md/nPD4/vvvj/nz50dvb+/4PWw4PatXr57w+BOf+ER0dXXFD37wg1i2bFnSVKXrxRdfjL/5m7+J++67Lz7+8Y9nj1OyKioqXA2ZAX//938f9fX1cf/994+vXXjhhXkDzRBXRjgjDQ8PR0TEeeedlzxJaRsbG4tHHnkkjh49Gi0tLdnjlKQNGzbEW97ylnjjG9+YPUpJe/7552PhwoXR0NAQ119/ffz85z/PHqkkfetb34rm5uZ4+9vfHvPnz48rrrgi7rvvvuyxpk2McMYpFArR0dERf/3Xfx2NjY3Z45SkZ555Jv7yL/8yqqqqor29Pb7xjW/EJZdckj1WyXnkkUfin/7pn6KzszN7lJK2fPny2L59ezzxxBNx3333xdDQUKxYsSIOHz6cPVrJ+fnPfx5dXV1x0UUXxRNPPBHt7e1x6623xvbt27NHmxYf03DGufnmm+Of//mf4+mnn84epWQtWbIk9u/fH7/5zW/i0UcfjRtuuCF2794tSIowMDAQH/zgB+PJJ5+M6urq7HFK2v//Ufall14aLS0t8apXvSq++tWvRkdHR+Jkpef48ePR3Nwcn/zkJyMi4oorrohnn302urq6JvxduFLjyghnlFtuuSW+9a1vxfe+97244IILsscpWZWVlfHqV786mpubo7OzMy6//PK45557sscqKb29vXHw4MFoamqKioqKqKioiN27d8fnPve5qKioiLGxsewRS9acOXPi0ksvjeeffz57lJKzYMGCSf+nYunSpdHf35800cxwZYQzQqFQiFtuuSW+8Y1vxK5du6KhoSF7pFmlUCjE6Oho9hgl5dprr530Gx/vfe974+KLL44PfehDUV5enjRZ6RsdHY3nnnsuVq1alT1KyVm5cuWk2x787Gc/i8WLFydNNDPEyDS9+OKL8S//8i/jj1944YXYv39/nHfeebFo0aLEyUrLhg0b4qGHHopvfvObce6558bQ0FBERNTW1sY555yTPF1p+chHPhJtbW1RX18fR44ciUceeSR27do16TeWOLVzzz130neW5syZE3PnzvVdpiLdfvvtsXr16li0aFEcPHgwPv7xj8fIyEjccMMN2aOVnNtuuy1WrFgRn/zkJ+Md73hH/PCHP4zu7u7o7u7OHm16CkzL9773vUJETNpuuOGG7NFKyonOYUQU7r///uzRSs773ve+wuLFiwuVlZWF888/v3DttdcWnnzyyeyxZoWrr7668MEPfjB7jJKzdu3awoIFCwpnn312YeHChYXrrruu8Oyzz2aPVbK+/e1vFxobGwtVVVWFiy++uNDd3Z090rSVFQqFQlIHAQD4AisAkEuMAACpxAgAkEqMAACpxAgAkEqMAACpxAgAkEqMAACpxAgAkEqMAACpxAgAkOr/AkeQVGyoNByEAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Get probabilities if die is loaded towards side 2\n",
    "probs_loaded_die = load_dice(n_sides, loaded_number=2)\n",
    "\n",
    "# Plot probabilities\n",
    "loaded_die_sides = sns.barplot(x=die, y=probs_loaded_die)\n",
    "loaded_die_sides.set_ylim(0,0.5)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7cdf0ec5",
   "metadata": {},
   "source": [
    "Now, feed the `probs_loaded_die` array into `np.random.choice` and see how this affect the metrics and plot:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "d98459f9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "mean of first_rolls: 3.30\n",
      "variance of first_rolls: 2.79\n",
      "\n",
      "mean of second_rolls: 3.27\n",
      "variance of second_rolls: 2.79\n",
      "\n",
      "mean of sum_of_rolls: 6.57\n",
      "variance of sum_of_rolls: 5.54\n",
      "\n",
      "covariance between first and second roll:\n",
      "[[ 2.7923992  -0.02500617]\n",
      " [-0.02500617  2.79302484]]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkAAAAGdCAYAAAD60sxaAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAwvElEQVR4nO3dfVSVdb7//9eWm42VkooiGCB6SjHSPJtzOqBkHRVHW5ozOnmTWpM6h2BSYJpRRMdkjnIyhyFT8GA6Lk/erVG754xiN2RJmQjVKo/WCQURDqITaP4Chf37w9X+zp69VUTYF3A9H2tda7E/+3N9rvfnWqt8rc91sy12u90uAAAAE+lidAEAAACeRgACAACmQwACAACmQwACAACmQwACAACmQwACAACmQwACAACmQwACAACm4210Ae1RU1OTzpw5o27duslisRhdDgAAaAa73a4LFy4oODhYXbpcf42HAOTGmTNnFBISYnQZAACgBcrLy3XXXXddtw8ByI1u3bpJunoCu3fvbnA1AACgOerq6hQSEuL4d/x6CEBu/HjZq3v37gQgAAA6mObcvsJN0AAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQAAAwHQIQABMJzR8gLx9fG+4hYYPMLpUAG3E2+gCAMDTzpw+ranrC27Yb3fiKA9UA8AIrAABAADTIQABAADTIQABAADTIQABAADTIQABAADTIQABAADTIQABAADTIQABAADTMTwAZWdnKzw8XH5+frLZbDp48OA1+1ZWVmrmzJkaNGiQunTpoqSkJLf9vvvuOyUmJiooKEh+fn6KiIhQXl5eG80AAAB0NIYGoF27dikpKUlpaWkqLi5WbGysxo8fr7KyMrf96+vr1bt3b6WlpWnYsGFu+zQ0NGjs2LE6efKkdu/erePHj2vjxo3q169fW04FAAB0IIb+FEZmZqbmzp2refPmSZKysrK0b98+5eTkKCMjw6V///799eKLL0qSNm/e7HbMzZs36/z58zp06JB8fHwkSWFhYW00AwAA0BEZtgLU0NCgoqIixcXFObXHxcXp0KFDLR73jTfeUHR0tBITExUYGKjIyEitWrVKjY2N19ynvr5edXV1ThsAAOi8DAtANTU1amxsVGBgoFN7YGCgqq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9vf29lavXr0kSUFBQbrnnnucLndFRESoqqpKDQ0NbsdNTU1VbW2tYysvL7+VqQEAgHbOsADk6+srm82m/Px8p/b8/HzFxMS43Sc6Otql//79+xUVFeW44XnEiBH65ptv1NTU5Ohz4sQJBQUFydfX1+24VqtV3bt3d9oAAEDnZeglsJSUFL388svavHmzjh07puTkZJWVlSk+Pl7S1ZWZOXPmOPrHx8fr1KlTSklJ0bFjx7R582Zt2rRJzz77rKPP008/rXPnzmnhwoU6ceKE3n77ba1atUqJiYkenx8AAGifDH0Mftq0aTp37pzS09NVWVmpyMhI5eXlOR5br6ysdHonUHh4uPLy8pScnKz169crODhYa9eudTwCL0khISHav3+/kpOTNXToUPXr108LFy7UokWLPD4/AADQPhkagCQpISFBCQkJbr/bsmWLS9uoUaN09OjR644ZHR2tjz/+uDXKAwAAnZDhT4EBAAB4GgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAACYDgEIAIAOJjR8gLx9fG+4hYYPMLrUdsvb6AKys7P1wgsvqLKyUvfee6+ysrIUGxt7zf4FBQVKSUnRl19+qeDgYP32t79VfHy82747d+7UjBkz9Oijj+q1115roxkAAOBZZ06f1tT1BTfstztxlAeq6ZgMXQHatWuXkpKSlJaWpuLiYsXGxmr8+PEqKytz27+0tFQTJkxQbGysiouLtWTJEi1YsEB79uxx6Xvq1Ck9++yz1w1TAADAnAwNQJmZmZo7d67mzZuniIgIZWVlKSQkRDk5OW77b9iwQaGhocrKylJERITmzZunp556SmvWrHHq19jYqMcff1wrVqzQgAEs/wEAAGeGBaCGhgYVFRUpLi7OqT0uLk6HDh1yu09hYaFL/3HjxunIkSO6fPmyoy09PV29e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Io8vpdHbu3KmjR4/q008/NbqUTu3bb79VTk6OUlJStGTJEh0+fFgLFiyQ1WrVnDlzjC6v01i0aJFqa2s1ePBgeXl5qbGxUStXrtSMGTOMLq3T+vHHtP/+B7QDAwN16tQpI0oyhR9++EGLFy/WzJkzPfYjtAQgD/vVr36lzz//nN8mawPl5eVauHCh9u/fLz8/P6PL6dSampoUFRWlVatWSZKGDx+uL7/8Ujk5OQSgVrRr1y698sor2r59u+69916VlJQoKSlJwcHBeuKJJ4wur1OzWCxOn+12u0sbWsfly5c1ffp0NTU1KTs722PHJQB50DPPPKM33nhDH3zwge666y6jy+l0ioqKVF1dLZvN5mhrbGzUBx98oHXr1qm+vl5eXl4GVth5BAUFaciQIU5tERER2rNnj0EVdU6/+c1vtHjxYk2fPl2SdN999+nUqVPKyMggALWRvn37Srq6EhQUFORor66udlkVwq27fPmyHnvsMZWWlurdd9/12OqPxFNgHmG32/WrX/1Ke/fu1bvvvqvw8HCjS+qURo8erS+++EIlJSWOLSoqSo8//rhKSkoIP61oxIgRLq9yOHHihOOHjNE6Ll26pC5dnP837eXlxWPwbSg8PFx9+/ZVfn6+o62hoUEFBQWKiYkxsLLO58fw8/XXX+vAgQPq1auXR4/PCpAHJCYmavv27Xr99dfVrVs3xzVmf39/de3a1eDqOo9u3bq53Fd1++23q1evXtxv1cqSk5MVExOjVatW6bHHHtPhw4eVm5ur3Nxco0vrVCZOnKiVK1cqNDRU9957r4qLi5WZmamnnnrK6NI6tIsXL+qbb75xfC4tLVVJSYl69uyp0NBQJSUladWqVbr77rt19913a9WqVbrttts0c+ZMA6vueK53noODgzV16lQdPXpUb731lhobGx3/Nvbs2VO+vr5tX6BHnjUzOUlutz/96U9Gl9bp8Rh823nzzTftkZGRdqvVah88eLA9NzfX6JI6nbq6OvvChQvtoaGhdj8/P/uAAQPsaWlp9vr6eqNL69Dee+89t/9PfuKJJ+x2+9VH4ZcvX27v27ev3Wq12h988EH7F198YWzRHdD1znNpaek1/2187733PFKfxW6329s+ZgEAALQf3AMEAABMhwAEAABMhwAEAABMhwAEAABMhwAEAABMhwAEAABMhwAEAABMhwAEAABMhwAEAABMhwAEAABMhwAEAABMhwAEAABM5/8HvxDK9rUxia0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "n_rolls = 20_000\n",
    "\n",
    "# Notice that the p parameter is being set\n",
    "first_rolls = np.array([np.random.choice(die, p=probs_loaded_die) for _ in range(n_rolls)])\n",
    "\n",
    "second_rolls = np.array([np.random.choice(die, p=probs_loaded_die) for _ in range(n_rolls)])\n",
    "\n",
    "sum_of_rolls = first_rolls + second_rolls\n",
    "\n",
    "print(f\"mean of first_rolls: {np.mean(first_rolls):.2f}\\nvariance of first_rolls: {np.var(first_rolls):.2f}\\n\")\n",
    "print(f\"mean of second_rolls: {np.mean(second_rolls):.2f}\\nvariance of second_rolls: {np.var(second_rolls):.2f}\\n\")\n",
    "print(f\"mean of sum_of_rolls: {np.mean(sum_of_rolls):.2f}\\nvariance of sum_of_rolls: {np.var(sum_of_rolls):.2f}\\n\")\n",
    "print(f\"covariance between first and second roll:\\n{np.cov(first_rolls, second_rolls)}\")\n",
    "\n",
    "\n",
    "sns.histplot(sum_of_rolls, stat = \"probability\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5af6e690",
   "metadata": {},
   "source": [
    "Now the histogram is skewed towards some values since some sums are now more likely than others. Try changing the loaded side and see how the histogram changes!\n",
    "\n",
    "Notice that covariance is still very close to zero since there is not any dependance between rolls of the die."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "06b40238",
   "metadata": {},
   "source": [
    "## Dependant Rolls\n",
    "\n",
    "To finish this lab you will now simulate the scenario in which the second roll depends on the result of the first one. Say that you are playing a variant of the game you have played so far and you only roll the die a second time if the result of the first roll is greater or equal to 4.\n",
    "\n",
    "Before doing the simulations reflect on what might happen in this scenario. Some behavior you will probably see:\n",
    "\n",
    "- 1 is now a possible result since if you get a 1 in the first roll you don't roll again\n",
    "- 1, 2 and 3 now have a greater chance of showing up\n",
    "- 4 is now not a possible result since you need to roll again if you get a 4 in the first roll\n",
    "\n",
    "To achieve this behaviour you can use the [np.where](https://numpy.org/doc/stable/reference/generated/numpy.where.html) function, which given a condition can be used to zero-out the elements that don't meet its criteria:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "f6ea0bed",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "mean of first_rolls: 3.48\n",
      "variance of first_rolls: 2.92\n",
      "\n",
      "mean of second_rolls: 1.71\n",
      "variance of second_rolls: 4.47\n",
      "\n",
      "mean of sum_of_rolls: 5.20\n",
      "variance of sum_of_rolls: 12.61\n",
      "\n",
      "covariance between first and second roll:\n",
      "[[2.92092564 2.61144602]\n",
      " [2.61144602 4.46929176]]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkkAAAGdCAYAAAAGx+eQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy88F64QAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAwy0lEQVR4nO3de1xVdb7/8fcWBNSUQhCkAHGOFxQzglQwsk6GBxvLM1pexkuT1mFoUmRskqzjpZKTeZTM29HRzFNearSpU54UmzLNWyKUGZXzCN2oMLRtAs3cKK7fH/7aj7OHrwqbrRv09Xw81uPB/u7v+n4/az9m8r3XWvu7bJZlWQIAAICbZr4uAAAAoDEiJAEAABgQkgAAAAwISQAAAAaEJAAAAANCEgAAgAEhCQAAwICQBAAAYODv6wKaqnPnzunYsWNq3bq1bDabr8sBAAB1YFmWTpw4ocjISDVrdvFzRYQkDx07dkxRUVG+LgMAAHigtLRUN91000X7EJI81Lp1a0nnP+Q2bdr4uBoAAFAXVVVVioqKcv07fjG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Pjcpt2rSpU7/s7GyNHj1aSUlJSk5O1tKlS2W325WRkSHp/CWuo0ePulbxls7/sk6STp48qe+++05FRUUKCAhQt27dJEkTJ07UHXfcoRdeeEH333+/3n77bW3ZskXbt2+v87wAAAB1DknXX3/9JS+x/XxfT01NTZ3GHDZsmI4fP66ZM2eqrKxM8fHx2rhxo+txJmVlZbXWLkpISHD9XVBQoNWrVysmJkaHDh2SJKWkpGjt2rV6+umn9cwzz+gXv/iF1q1bp969e9d5XgAAgDqHpA8//PCyFJCZmanMzEzjeytXrqzVZlnWJcccOnSohg4d6vG8AAAAdQ5J/fr1u5x1AAAANCp1Dkmff/654uPj1axZM33++ecX7XvzzTc3uDAAAABfqnNIuuWWW1ReXq527drplltukc1mM176qs89SQAAAI1VnUNSSUmJwsLCXH8DAABczeockv7vL7/4FRgAALja1esBt//X119/rZdfflnFxcWy2Wzq2rWrHn/8cXXp0sWb9QEAAPiERw+4/dOf/qT4+HgVFBSoZ8+euvnmm7Vv3z7Fx8frzTff9HaNAAAAV5xHZ5L+8Ic/KCcnRzNnznRrnzZtmp588kk98MADXikOAADAVzw6k1ReXq4xY8bUah81alStB8cCAAA0RR6FpDvvvFPbtm2r1b59+3alpqY2uCgAAABfq/Pltnfeecf193333acnn3xSBQUF6tOnjyRp165devPNNzVjxgzvVwkAAHCF1TkkDR48uFbbokWLtGjRIre2xx57TBkZGQ0uDAAAwJfqHJLOnTt3OesAAABoVDy6JwkAAOBq5/Fikj/++KO2bt0qu92u6upqt/cmTJjQ4MIAAAB8yaOQVFhYqIEDB+rUqVP68ccfFRISIofDoZYtW6pdu3aEJAAA0OR5dLlt0qRJGjRokL7//nu1aNFCu3bt0uHDh5WYmKg5c+Z4u0YAAIArzqOQVFRUpN///vfy8/OTn5+fnE6noqKiNHv2bD311FPerhEAAOCK8+hyW/PmzWWz2SRJ4eHhstvtiouLU3BwsOx2u1cLBIDGym63y+FwNHic0NBQRUdHe6EiAN7kUUhKSEjQ3r171blzZ911113693//dzkcDv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VLdfPPNvi6lyfn73/+uvn37qnnz5vrf//1fffnll/rP//xPVsKvpxdeeEFLlizRggULVFxcrNmzZ+vFF1/Uyy+/7OvSGrUff/xRPXv21IIFC4zvz549W3PnztWCBQv06aefKiIiQvfcc49OnDhxhStt3C72OZ46dUr79u3TM888o3379mnDhg365ptvdN999125An22+ACavIqKCksSa0x56MSJE1anTp2s/Px8q1+/ftbEiRN9XVKT8uSTT1q33367r8to8u69917r4Ycfdmv71a9+ZY0aNcpHFTU9kqy33nrL9frcuXNWRESE9R//8R+uttOnT1vBwcHWkiVLfFBh0/CPn6PJnj17LEnW4cOHr0hNnEmCxyorKyVJISEhPq6kaXrsscd07733qn///r4upUl65513lJSUpAceeEDt2rVTQkKCli1b5uuympzbb79dH3zwgb755htJ0meffabt27dr4MCBPq6s6SopKVF5ebnS0tJcbYGBgerXr5927Njhw8qavsrKStlstit2xtinjyVB02VZlrKzs3X77bcrPj7e1+U0OWvXrtW+ffv06aef+rqUJuvbb7/V4sWLlZ2draeeekp79uzRhAkTFBgYqDFjxvi6vCbjySefVGVlpbp27So/Pz/V1NTo+eef14gRI3xdWpP18wPU//Gh6eHh4Tp8+LAvSroqnD59WlOmTNHIkSOv2IODCUnwyO9+9zt9/vnnbs/EQ92UlpZq4sSJ2rx5s4KCgnxdTpN17tw5JSUladasWZKkhIQEHThwQIsXLyYk1cO6dev02muvafXq1erevbuKioqUlZWlyMhIjR071tflNWk2m83ttWVZtdpQN2fOnNHw4cN17tw5LVq06IrNS0hCvT3++ON655139PHHH+umm27ydTlNTkFBgSoqKpSYmOhqq6mp0ccff6wFCxbI6XTKz8/PhxU2De3bt1e3bt3c2uLi4rR+/XofVdQ0PfHEE5oyZYqGDx8uSerRo4cOHz6s3NxcQpKHIiIiJJ0/o9S+fXtXe0VFRa2zS7i0M2fO6MEHH1RJSYn+8pe/XLGzSBK/bkM9WJal3/3ud9qwYYP+8pe/KDY21tclNUl333239u/fr6KiIteWlJSkX//61yoqKiIg1VHfvn1rLUHxzTffKCYmxkcVNU2nTp1Ss2bu/xT4+fmxBEADxMbGKiIiQvn5+a626upqbd26VSkpKT6srOn5OSAdPHhQW7ZsUdu2ba/o/JxJQp099thjWr16td5++221bt3add09ODhYLVq08HF1TUfr1q1r3cfVqlUrtW3blvu76mHSpElKSUnRrFmz9OCDD2rPnj1aunSpli5d6uvSmpRBgwbp+eefV3R0tLp3767CwkLNnTtXDz/8sK9La9ROnjypv/71r67XJSUlKioqUkhIiKKjo5WVlaVZs2apU6dO6tSpk2bNmqWWLVtq5MiRPqy68bnY5xgZGamhQ4dq3759evfdd1VTU+P6dyckJEQBAQGXv8Ar8hs6XBUkGbdXXnnF16U1eSwB4Jn/+Z//seLj463AwECra9eu1tKlS31dUpNTVVVlTZw40YqOjraCgoKsjh07WlOnTrWcTqevS2vUPvzwQ+N/D8eOHWtZ1vllAKZNm2ZFRERYgYGB1h133GHt37/ft0U3Qhf7HEtKSi74786HH354ReqzWZZlXf4oBgAA0LRwTxIAAIABIQkAAMCAkAQAAGBASAIAADAgJAEAABgQkgAAAAwISQAAAAaEJAAAAANCEgAAgAEhCQAAwICQBAAAYEBIAgAAMPh/2MrPK4UzAksAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "n_rolls = 20_000\n",
    "\n",
    "first_rolls = np.array([np.random.choice(die) for _ in range(n_rolls)])\n",
    "\n",
    "second_rolls = np.array([np.random.choice(die) for _ in range(n_rolls)])\n",
    "\n",
    "# Preserve the result of the second throw only if the first roll was greater or equal to 4\n",
    "second_rolls = np.where(first_rolls>=4, second_rolls, 0)\n",
    "\n",
    "sum_of_rolls = first_rolls + second_rolls\n",
    "\n",
    "print(f\"mean of first_rolls: {np.mean(first_rolls):.2f}\\nvariance of first_rolls: {np.var(first_rolls):.2f}\\n\")\n",
    "print(f\"mean of second_rolls: {np.mean(second_rolls):.2f}\\nvariance of second_rolls: {np.var(second_rolls):.2f}\\n\")\n",
    "print(f\"mean of sum_of_rolls: {np.mean(sum_of_rolls):.2f}\\nvariance of sum_of_rolls: {np.var(sum_of_rolls):.2f}\\n\")\n",
    "print(f\"covariance between first and second roll:\\n{np.cov(first_rolls, second_rolls)}\")\n",
    "\n",
    "\n",
    "sns.histplot(sum_of_rolls, stat = \"probability\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "970303f1",
   "metadata": {},
   "source": [
    "Looks like all of the predictions of this new scenario indeed happened. Notice that the covariance now is nowhere near zero since there is a dependency between the first and the second roll!"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1b016cd1",
   "metadata": {},
   "source": [
    "**Now you have finished this ungraded lab, nice job!**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2d2c3cf5",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
